/*
 *  Copyright 2023, SGE.  All right reserved.
 *
 *  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SGE CO.,
 *  LTD.  THE CONTENTS OF THIS FILE MAY NOT BE DISCLOSED TO THIRD
 *  PARTIES, COPIED OR DUPLICATED IN ANY FORM, IN WHOLE OR IN PART,
 *  WITHOUT THE PRIOR WRITTEN PERMISSION OF SGE CO., LTD.
 *
 *  
 *
 *  Edit History:
 *
 *    2023年02月17日 - Created by zzx 
 *
 */
#include <gtest/gtest.h>
#include "monitorBizIf.h"
#include "monitorBiz.h"
#include "memdb.h"
#include "MockDB.h"

using namespace std;


TEST(BizTest, test){
}

TEST(MonitorBizIfTest, OrderQueryOption){
    unsigned int offset = 1, size = 2;
    OrderQueryOptionS *p = orderQueryCreateOption(offset, size);
    ASSERT_TRUE(p != nullptr);
    ASSERT_EQ(offset, orderQueryOptionGetOffset(p));
    ASSERT_EQ(size, orderQueryOptionGetSize(p));
    orderQueryDestroyOption(p);
}

TEST(MonitorBizIfTest, OrderQueryData){
    OrderQueryDataS *p = orderQueryCreateData(5);
    ASSERT_TRUE(p != nullptr);
    orderQueryDestroyData(p);
}

TEST(MonitorBizIfTest, OrderQuery){
    int offset = 1, size = 2;
    OrderQueryOptionS *option = orderQueryCreateOption(offset, size);
    OrderQueryDataS *data = orderQueryCreateData(5);
    int ret = orderQuery(option, data);
    ASSERT_EQ(ret, 0);
    orderQueryDestroyOption(option);
    orderQueryDestroyData(data);

}

TEST(MonitorBizTest, MonitorBiz){
	MockDB db;
	MonitorBiz mb(db);
}
